package com.xiaojiu.app;

import android.app.Application;

import com.yanzhenjie.nohttp.OkHttpNetworkExecutor;
import com.yolanda.nohttp.Logger;
import com.yolanda.nohttp.NoHttp;

/**
 * Created by Jacky on 2016/10/31.
 */

public class App extends Application {
    private static Application instance;

    @Override
    public void onCreate() {
        super.onCreate();

        instance = this;
        NoHttp.initialize(this, new NoHttp.Config()
                // 使用OkHttp
                .setNetworkExecutor(new OkHttpNetworkExecutor()));
        Logger.setDebug(true);
    }

    public static Application getInstance() {
        return instance;
    }
}